﻿using System;
using System.Collections.Generic;
using System.Text;

namespace AudioPlayer.Plugin.Storage
{
	/// <summary>
	/// Playlist
	/// </summary>
	public interface IPlaylist
	{
		Guid Guid { get; set; }
		/// <summary>
		/// Gets or sets the name.
		/// </summary>
		/// <value>The name.</value>
		string Name { get; set; }

		/// <summary>
		/// Gets or sets the description.
		/// </summary>
		/// <value>The description.</value>
		string Description { get; set; }

		/// <summary>
		/// Gets or sets a value indicating whether this <see cref="IPlaylist"/> is loaded.
		/// </summary>
		/// <value><c>true</c> if loaded; otherwise, <c>false</c>.</value>
		bool Loaded { get; set; }

		/// <summary>
		/// Gets or sets a value indicating whether this <see cref="IPlaylist"/> is primary.
		/// </summary>
		/// <value><c>true</c> if primary; otherwise, <c>false</c>.</value>
		bool Primary { get; set; }

		/// <summary>
		/// Gets or sets a value indicating whether users defined.
		/// </summary>
		/// <value><c>true</c> if user defined; otherwise, <c>false</c>.</value>
		bool UserDefined { get; set; }
		/// <summary>
		/// Adds song to playlist
		/// </summary>
		/// <param name="song">The Song.</param>
		void Add(ISong song);

		/// <summary>
		/// Removes song from playlist.
		/// </summary>
		/// <param name="song">The song.</param>
		void Remove(ISong song);

		/// <summary>
		/// Determines if songs exists.
		/// </summary>
		/// <param name="song">The song.</param>
		/// <returns></returns>
		bool Exists(ISong song);

		/// <summary>
		/// Gets or sets the <see cref="AudioPlayer.Plugin.Storage.ISong"/> at the specified index.
		/// </summary>
		/// <value>Zero based index</value>
		ISong this[int index] { get; set; }

		/// <summary>
		/// Gets or sets the <see cref="AudioPlayer.Plugin.Storage.ISong"/> with the specified song.
		/// </summary>
		/// <value>Song Key or Guid</value>
		ISong this[string song] { get; set; }
		/// <summary>
		/// Gets the count.
		/// </summary>
		/// <value>The count.</value>
		int Count { get; }
	}
}
